﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TextQuotes.ascx.cs"
    Inherits="Cheenti.UserControls.TextQuotes" %>
<%@ Register Src="TextSlide.ascx" TagName="TextSlide" TagPrefix="uc2" %>
<link rel="stylesheet" href="Styles/TextSlides.css" />
<script src="scripts/jquery.min.js"></script>
<script src="scripts/slides.min.jquery.js"></script>
<script>
    $(function () {
        // Set starting slide to 1
        var startSlide = 1;
        // Get slide number if it exists
        if (window.location.hash) {
            startSlide = window.location.hash.replace('#', '');
        }
        // Initialize Slides
        $('#slides').slides({
            preload: true,
            preloadImage: 'Images/TextSlides/loading.gif',
            generatePagination: true,
            play: 30000,
            pause: 5000,
            hoverPause: true,
            // Get the starting slide
            //start: startSlide,
            start: 1,
            animationComplete: function (current) {
                // Set the slide number as a hash
                window.location.hash = '#' + current;
            }
        });
    });
</script>
<form id="form1" runat="server">
<div id="container">
    <div id="example">
        <div id="slides">
            <div class="slides_container">


            <asp:Repeater ID="Repeater1" runat="server">
                    <ItemTemplate>
                        <uc2:TextSlide SlideType="Joke" ItemIndex='<%# DataBinder.Eval(Container, "DataItem.Id")%>'
                            ID="TextSlide1" runat="server"><title>
                                <%# DataBinder.Eval(Container, "Parent.BindingContainer.DataItem.Title")%></title>
                            <body>
                                <%# DataBinder.Eval(Container, "Parent.BindingContainer.DataItem.Body")%>
                                </body>
                            <footer><%# DataBinder.Eval(Container, "Parent.BindingContainer.DataItem.Footer")%></footer>
                        </uc2:TextSlide>
                    </ItemTemplate>
                </asp:Repeater>

               
            </div>
            <a href="#" class="prev">
                <img src="Images/TextSlides/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
            <a href="#" class="next">
                <img src="Images/TextSlides/arrow-next.png" width="24" height="43" alt="Arrow Next"></a>
        </div>
        <img src="Images/TextSlides/example-frame.png" width="739" height="341" alt="Frame"
            id="frame">
    </div>
</div>
</form>
